package com.streetpower.biz.service;

import com.streetpower.dao.UserDao;
import com.streetpower.common.result.Response;
import com.streetpower.facade.entity.User;
import com.streetpower.facade.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @Description:
 * @Author: lipeng
 * @CreateDate: 2019/5/12 17:02
 */
@Service
public class LoginServiceImpl implements LoginService{

    @Autowired
    UserDao userDao;

    @Override
    public Response<User> login(String userName, String password) {
        Response<User> response = new Response<>(true,200);
        response.setMessage("查询成功");
        User user = userDao.selectUserByUserName(userName);
        response.setData(user);
        return response;
    }
}
